<?php
$config = array(
/** 后台操作 */
	 'login/index' => array(
		array(
				'field' => 'username',
				'label' => '用户名',
				'rules' => 'trim|required|min_length[3]|max_length[30]|xss_clean'
			 ),
		array(
				'field' => 'passwd',
				'label' => '密码',
				'rules' => 'trim|required|min_length[6]|max_length[30]'
			 )
		),
			
	 'user/login' => array(
		array(
				'field' => 'user_name',
				'label' => '用户名',
				'rules' => 'trim|required|min_length[6]|max_length[20]|xss_clean'
			 ),
		array(
				'field' => 'passwd',
				'label' => '密码',
				'rules' => 'trim|required|min_length[6]|max_length[20]'
			 )
		),
			
	 'user_type/edit' => array(
		array(
				'field' => 'user_type_name',
				'label' => '会员分类名',
				'rules' => 'trim|required'
			 )
		),
	
	'admin_user/add' => array(
		array(
				'field' => 'user_name',
				'label' => '用户名',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'email',
				'label' => 'Email地址',
				'rules' => 'trim|required|valid_email'
			 ),
		array(
				'field' => 'password',
				'label' => '密码',
				'rules' => 'trim|required|min_length[6]|md5'
			 ),
		array(
				'field' => 'repassword',
				'label' => '确认密码',
				'rules' => 'trim|required|matches[password]|min_length[6]|md5'
			 )
		),
	
	'admin_user/edit' => array(
		array(
				'field' => 'user_name',
				'label' => '用户名',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'email',
				'label' => 'Email地址',
				'rules' => 'trim|required|valid_email'
			 ),
		array(
				'field' => 'oldpassword',
				'label' => '旧密码',
				'rules' => 'trim|callback_checkOldpasswd|md5'
			 ),
		array(
				'field' => 'newpassword',
				'label' => '新密码',
				'rules' => 'trim|min_length[6]|md5'
			 ),
		array(
				'field' => 'renewpassword',
				'label' => '确认新密码',
				'rules' => 'trim|callback_checkrepasswd|matches[newpassword]|min_length[6]|md5'
			 ),
		),
	
	'role/add' => array(
		array(
				'field' => 'role_name',
				'label' => '角色名',
				'rules' => 'trim|required'
			 )
		),

	'admin/modi' => array(
		array(
				'field' => 'newpasswd',
				'label' => '新密码',
				'rules' => 'trim|required|min_length[6]|max_length[30]'
			 ),
		array(
				'field' => 'repasswd',
				'label' => '确认密码',
				'rules' => 'trim|required|matches[newpasswd]|min_length[6]|max_length[30]'
			 ),
		array(
				'field' => 'oldpasswd',
				'label' => '旧密码',
				'rules' => 'trim|required|callback_checkOldpasswd|min_length[6]|max_length[30]'
			 )
		),

		'production/edit' => array(
		array(
				'field' => 'name',
				'label' => '产品名称',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'intro',
				'label' => '详细说明',
				'rules' => 'trim|required'
			 )
		),

	'advertisement/edit' => array(
		array(
				'field' => 'title',
				'label' => '广告名称',
				'rules' => 'trim|required|min_length[2]|max_length[50]'
			 )
		),
	
	'article/edit' => array(
		array(
				'field' => 'title',
				'label' => '资讯标题',
				'rules' => 'trim|required|min_length[2]|max_length[60]'
			 )
		),

	 'category/add' => array(
		array(
				'field' => 'catename',
				'label' => '类别名称',
				'rules' => 'trim|required|min_length[2]|max_length[30]'
			 ),
		array(
				'field' => 'parentid',
				'label' => '所属父类',
				'rules' => 'callback_check_cateid'
			 ),

		array(
				'field' => 'func',
				'label' => '所属应用',
				'rules' => 'trim|required|min_length[1]|max_length[30]'
			 )
		),

	'region/add' => array(
		array(
				'field' => 'name',
				'label' => '地址',
				'rules' => 'trim|required'
			 )
		),
	
	'notice/add' => array(
		array(
				'field' => 'title',
				'label' => '公告标题',
				'rules' => 'trim|required|xss_clean'
			 ),
		array(
				'field' => 'content',
				'label' => '详细内容',
				'rules' => 'trim|required|xss_clean'
			 )
		),
	'production/reply' => array(
		array(
				'field' => 'reply_title',
				'label' => '回复标题',
				'rules' => 'trim|required|xss_clean'
			 ),
		array(
				'field' => 'reply_content',
				'label' => '回复内容',
				'rules' => 'trim|required|xss_clean'
			 ),
		array(
				'field' => 'is_reply',
				'label' => '回复状态',
				'rules' => 'trim|required|xss_clean'
			 ),
		),
	
/*前台操作*/
	'feedback/add' => array(
		array(
				'field' => 'contact',
				'label' => '姓名',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'email',
				'label' => '邮箱',
				'rules' => 'trim|required|valid_email'
			 ),
		array(
				'field' => 'content',
				'label' => '留言内容',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'vcode',
				'label' => '验证码',
				'rules' => 'trim|required'
			 )
		),
	'feedback_en/add' => array(
		array(
				'field' => 'contact',
				'label' => 'Name',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'email',
				'label' => 'Email',
				'rules' => 'trim|required|valid_email'
			 ),
		array(
				'field' => 'content',
				'label' => 'Content',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'vcode',
				'label' => 'Code',
				'rules' => 'trim|required'
			 )
		),
	'order/add' => array(
		array(
				'field' => 'title',
				'label' => '询价产品',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'contact',
				'label' => '姓名',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'email',
				'label' => '邮箱',
				'rules' => 'trim|required|valid_email'
			 )/*,
		array(
				'field' => 'vcode',
				'label' => '验证码',
				'rules' => 'trim|required'
			 )*/
		),
	'order_en/add' => array(
		array(
				'field' => 'title',
				'label' => 'Product',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'contact',
				'label' => 'Name',
				'rules' => 'trim|required'
			 ),
		array(
				'field' => 'email',
				'label' => 'Email',
				'rules' => 'trim|required|valid_email'
			 ),
		array(
				'field' => 'vcode',
				'label' => 'Code',
				'rules' => 'trim|required'
			 )
		),
);